package decorator.stream;

import java.io.BufferedInputStream;
import java.io.FileInputStream;
import java.io.IOException;

public class DecoratorPattern {

    public static void main(String[] args) {
        try {
            LowerCaseInputStream in =
                    new LowerCaseInputStream(
                            new BufferedInputStream(
                                    new FileInputStream(".\\resources\\test.txt")));
            int c = 0;
            while ((c = in.read()) >= 0) {
                System.out.print((char) c);
            }
            in.close();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }

}
